package com.edu.service;

import com.edu.dao.MemberMapper;
import com.edu.pojo.Member;
import org.springframework.stereotype.Service;

import java.util.List;


public class MemberServiceImpl implements MemberService{
    private MemberMapper memberMapper;

    public void setMemberMapper(com.edu.dao.MemberMapper mapper)
    {
        this.memberMapper = mapper;
    }


    public int addMember(Member member) {
        return memberMapper.addMember(member);
    }

    public List<Member> showAllMember() {
        return memberMapper.queryAllMember();
    }

    public int updateStudent(Member member) {
        return memberMapper.updateMember(member);
    }

    public int deleteStudent(String memberNo) {
        return memberMapper.deleteMember(memberNo);
    }

    public Member getMemberByNO(String memberNo){
        return memberMapper.selectMember(memberNo);
    }

    public List<Member> showAllMinister(){return memberMapper.queryAllMinister();};

    public List<Member> showdepartment(int department) {
        return memberMapper.showdepartment(department);
    }
}
